package java0107;

import java.util.HashSet;
import java.util.Set;

public class Java03 {
    public static void main(String[] args) {

        // (3)Set集合：不重复

        Set<Integer> set = new HashSet<>();

        System.out.println(set.add(2));
        System.out.println(set.add(2));
        System.out.println(set.add(2));
        System.out.println(set.add(2));

        for (int i : set) {
            System.out.println(i);
        }


    }
}
